//
//  User.m
//  Gruphoto
//
//  Created by Thao Nguyen Huy on 1/22/13.
//  Copyright (c) 2013 CNC Software. All rights reserved.
//

#import "User.h"

@implementation User

@synthesize userId, firstName, lastName, email, avatarUrl, token, socialId, avatarImage, phoneNumber;
@synthesize numberOfFollowers, numberOfLikes, numberOfPhotos, loginType;

- (id)init {
    if (self = [super init]) {
        self.email = @"";
        self.firstName = @"";
        self.lastName = @"";
        self.phoneNumber = @"";
        self.avatarUrl = @"";        
        self.token = @"";
        self.socialId = @"";
        self.loginType = LoginTypeAppAccount;
    }
    return self;
}

- (id)initWithEmail:(NSString *)_email firstName:(NSString *)_firstName lastName:(NSString *)_lastName phoneNumber:(NSString *)_phoneNumber avatarImage:(UIImage *)_avatar {
    if (self = [super init]) {
        self.email = _email;
        self.firstName = _firstName;
        self.lastName = _lastName;
        self.phoneNumber = _phoneNumber;
        self.avatarImage = _avatar;
        self.avatarUrl = @"";        
        self.token = @"";
        self.socialId = @"";
        self.loginType = LoginTypeAppAccount;
    }
    return self;
}

- (void)dealloc {
    self.firstName = nil;
    self.lastName = nil;
    self.email = nil;
    self.phoneNumber = nil;
    self.avatarUrl = nil;
    self.avatarImage = nil;
    self.token = nil;
    self.socialId = nil;
    [super dealloc];
}

@end
